﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace skiordie_gui
{
    public partial class ParticipantForm : Form
    {
        public ParticipantForm()
        {
            InitializeComponent();
        }

        public String firstName { get; set; }
        public String lastName { get; set; }
        public DateTime birthDate { get; set; }

        private void btnOk_Click(object sender, EventArgs e)
        {
            firstName = textBox1.Text;
            lastName = textBox2.Text;
            birthDate = dateTimePicker1.Value;
            this.DialogResult = DialogResult.OK;
        }

        private void ChampionshipForm_Shown(object sender, EventArgs e)
        {
            if (Tag != null)
            {
                textBox1.Text = firstName;
                textBox2.Text = lastName;
                dateTimePicker1.Value = birthDate;
                
            }
        }
    }
}
